﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UCLHJinInfoQS.ascx.cs" Inherits="Web.Controls.UCLHJinInfoQS" %>
<%@ Register Assembly="DevExpress.Web.v15.2, Version=15.2.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web" TagPrefix="dx" %>
<script type="text/javascript">
    //$(function () {

    //});
    function GetValue(type) {
        if (type == 'bh') {
            return UCLHUserInfo_hdCollection.Get("bh");
        }
        else {
            return "";
        }
    }
    function UCLHUserInfo_txtBHKeyPress() {
        if (event.keyCode == 13) {            
            setTimeout(function () {
            }, 0);
            event.preventDefault ? event.preventDefault() : (event.returnValue = false);
            //变更时清空信息
            UCLHUserInfo_txtLaoBH.SetText("");
            UCLHUserInfo_txtDiZhi.SetText("");
            UCLHUserInfo_txtYongHuH.SetText("");
            UCLHUserInfo_txtYongHuM.SetText("");
            if (UCLHUserInfo_txtJinBH.GetText() == '') {
                alert('请输入井编号。');
                UCLHUserInfo_txtLaoBH.SetText("");
                UCLHUserInfo_txtDiZhi.SetText("");
                UCLHUserInfo_txtJinBH.Focus();
                return;
            }
            UCLHUserInfo_ASPxCallback1.PerformCallback("bh");
        }
    }
    function UCLHUserInfo_txtBH2KeyPress() {
        if (event.keyCode == 13) {
            setTimeout(function () {

            }, 0);
            event.preventDefault ? event.preventDefault() : (event.returnValue = false);
            if (UCLHUserInfo_txtTargetYongHuH.GetText() == '') {
                alert('请输入目标用户号。');
                UCLHUserInfo_txtTargetYongHuM.SetText("");
                UCLHUserInfo_txtTargetYongHuH.Focus();
                return;
            }
            UCLHUserInfo_ASPxCallback1.PerformCallback("bh2");
        }
    }
    function UCLHUserInfo_ASPxCallbackCommonComplete(rs) {
        var arr = rs.split('|');
        var type = arr[0];
        var state = arr[1];
        var specialIdentity = arr[2];
        var msg = arr[3].split('-');
        if (msg[0] == 'True') {
            alert(msg[1]);
        }
        UCLHUserInfo_hdCollection.Set("type", type);
        if (state == 'True') {
            if (type == "bh") {
                //加载信息
                UCLHUserInfo_txtDiZhi.SetText(arr[4]);
                UCLHUserInfo_txtLaoBH.SetText(arr[5]);
                UCLHUserInfo_txtYongHuH.SetText(arr[6]);
                UCLHUserInfo_txtYongHuM.SetText(arr[7]);
                if (typeof (UCLHUserInfo_txtTargetYongHuH) == "undefined") {
                    UCLHUserInfo_btnActPerform.onClick();
                }
            }
            else if (type == "bh2") {
                //加载信息
                UCLHUserInfo_txtTargetYongHuM.SetText(arr[4]);
                UCLHUserInfo_btnActPerform.onClick();
            }
        }
    }

</script>
<div style="display: none;">
    <dx:ASPxButton ID="btnActPerform" ClientInstanceName="UCLHUserInfo_btnActPerform" runat="server" Text="ASPxButton" UseSubmitBehavior="false" OnClick="btnActPerform_Click"></dx:ASPxButton>
</div>
<dx:ASPxHiddenField ID="hdCollection" ClientInstanceName="UCLHUserInfo_hdCollection" runat="server"></dx:ASPxHiddenField>
<dx:ASPxCallback ID="ASPxCallback1" ClientInstanceName="UCLHUserInfo_ASPxCallback1" runat="server" OnCallback="ASPxCallback1_Callback" ClientSideEvents-CallbackComplete="function(s,e){UCLHUserInfo_ASPxCallbackCommonComplete(e.result);}"></dx:ASPxCallback>
<fieldset style="border: 1px solid  cornflowerblue; width: 97%; margin: auto;">
    <legend><b>
        <dx:ASPxLabel ID="lblTitle" runat="server" Text="井信息"></dx:ASPxLabel>
    </b></legend>
    <table style="width: 70%; margin: auto;">
        <tr>
            <td align="right" style="width: 20%">登记文号：
            </td>
            <td style="width: 25%">
                <dx:ASPxTextBox ID="txtLaiHanBH" ReadOnly="true" runat="server" Width="100%" Text=""></dx:ASPxTextBox>
            </td>
            <td style="width: 20%; text-align: right"><%--许可受理号：--%></td>
            <td style="width: 25%">
                <dx:ASPxTextBox ID="txtXuKeZH" ReadOnly="true" runat="server" Width="100%" Text="" Visible="false"></dx:ASPxTextBox>
            </td>
        </tr>
        <tr>
            <td align="right">
                <dx:ASPxLabel ID="lblBH" runat="server" Text="井编号："></dx:ASPxLabel>
            </td>
            <td>
                <table style="width:100%">
                    <tr>
                        <td style="width:60%">
                            <dx:ASPxTextBox ID="txtJinBH" ClientInstanceName="UCLHUserInfo_txtJinBH" runat="server"  ClientSideEvents-KeyPress="function(s,e){UCLHUserInfo_txtBHKeyPress();}"></dx:ASPxTextBox>
                        </td>
                        <td>
                            <%--<dx:ASPxButton runat="server" ID="btnChaXun" UseSubmitBehavior="false" Text="查询" AutoPostBack="false" Visible="true" ClientSideEvents-Click="function(s,e){UCLHJinInfoQS_CX();}">
                </dx:ASPxButton>--%>
                        </td>
                    </tr>
                </table>
            </td>
            <td align="right">
                <dx:ASPxLabel ID="lblYBH" runat="server" Text="原井编号："></dx:ASPxLabel>
             </td>
            <td>
                <dx:ASPxTextBox ID="txtLaoBH" ClientInstanceName="UCLHUserInfo_txtLaoBH" runat="server" Text="" Width="100%"></dx:ASPxTextBox>
            </td>
        </tr>
        <tr>
            <td align="right">
                <dx:ASPxLabel ID="lblDZ" runat="server" Text="井地址："></dx:ASPxLabel>
            </td>
            <td colspan="3">
                <dx:ASPxTextBox ID="txtDiZhi" ClientInstanceName="UCLHUserInfo_txtDiZhi" runat="server" Text="" Width="100%"></dx:ASPxTextBox>
            </td>
        </tr>
        <tr>
            <td align="right">
                <dx:ASPxLabel ID="ASPxLabel1" runat="server" Text="用户号："></dx:ASPxLabel>
            </td>
            <td colspan="3">
                <dx:ASPxTextBox ID="txtYongHuH" ClientInstanceName="UCLHUserInfo_txtYongHuH" runat="server" Text="" Width="100%"></dx:ASPxTextBox>
            </td>
        </tr>
        <tr>
            <td align="right">
                <dx:ASPxLabel ID="ASPxLabel2" runat="server" Text="用户名："></dx:ASPxLabel>
            </td>
            <td colspan="3">
                <dx:ASPxTextBox ID="txtYongHuM" ClientInstanceName="UCLHUserInfo_txtYongHuM" runat="server" Text="" Width="99.5%"></dx:ASPxTextBox>
            </td>
        </tr>
        <tr id="trTarget1" runat="server">
            <td align="right">
                <dx:ASPxLabel ID="ASPxLabel3" runat="server" Text="目标用户号："></dx:ASPxLabel>
            </td>
            <td colspan="3">
                <dx:ASPxTextBox ID="txtTargetYongHuH" ClientInstanceName="UCLHUserInfo_txtTargetYongHuH" runat="server" Text="" Width="100%" ClientSideEvents-KeyPress="function(s,e){UCLHUserInfo_txtBH2KeyPress();}"></dx:ASPxTextBox>
            </td>
        </tr>
        <tr id="trTarget2" runat="server">
            <td align="right">
                <dx:ASPxLabel ID="ASPxLabel4" runat="server" Text="目标用户名："></dx:ASPxLabel>
            </td>
            <td colspan="3">
                <dx:ASPxTextBox ID="txtTargetYongHuM" ClientInstanceName="UCLHUserInfo_txtTargetYongHuM" runat="server" Text="" Width="99.5%"></dx:ASPxTextBox>
            </td>
        </tr>
        <tr runat="server" id="trYHDZ">
            <td align="right">
                <dx:ASPxLabel ID="ASPxLabel5" runat="server" Text="用户地址："></dx:ASPxLabel>
            </td>
            <td colspan="3">
                <dx:ASPxTextBox ID="txtYongHuDZ" ClientInstanceName="UCLHUserInfo_txtYongHuDZ" runat="server" Text="" Width="99.5%"></dx:ASPxTextBox>
            </td>
        </tr>
    </table>
</fieldset>
